Skip to content

fix(query): harden query_arrow follow and non-Arrow 200 - #241

Merged
eddietejeda merged 1 commit into
mainfrom
fix/query-arrow-hardening
Nov 19, 2026
Merged

eddietejeda merged 1 commit into
mainfrom
fix/query-arrow-hardening

Conversation

@eddietejeda

Copy link
Copy Markdown
Contributor

Ports two fixes from the review of the same helper in the Rust SDK (hotdata-dev/sdk-rust#189).

  • Byte guard on the follow path. When query_arrow reads a large result from the Results API, it now enforces max_auto_bytes (instance default or per-call) as well as max_auto_rows, measured on the Arrow data. The row guard alone does not bound memory when rows are wide. Past the guard it raises ResultTooLargeError(kind="bytes").
  • Non-Arrow 200. If the server answers 200 with something other than an Arrow stream, query_arrow raises ApiException with the response body kept, instead of an Arrow decode error. The query ran, so the run id must not be lost. It is not retried.

Behaviour change: a followed result over the default 64 MiB byte guard now raises unless the caller raises max_auto_bytes or sets it to None. query already behaves this way for JSON.

Unit tests cover both. The integration suite and a live large-result run pass.

- Enforce max_auto_bytes when a large result is read from the Results API,
  on the size of the Arrow data; the row guard alone does not bound memory.
- A 200 that is not Arrow raises ApiException with the response body kept,
  instead of a decode error, so the run id of a query that ran is not lost.
@eddietejeda
eddietejeda requested a review from a team as a code owner November 19, 2026 19:38
@eddietejeda
eddietejeda requested review from shefeek-jinnah and removed request for a team November 19, 2026 19:38
@eddietejeda
eddietejeda merged commit a43b272 into main Nov 19, 2026
5 checks passed
@eddietejeda
eddietejeda deleted the fix/query-arrow-hardening branch November 19, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant